//
// Created by wxd on 2025/7/27.
//

#include "BaseCamera.h"

#include "output.hpp"
#include "glm/ext/matrix_transform.hpp"

void BaseCamera::setCameraParams(const glm::vec3 pos, const glm::vec3 up, const glm::vec3 right) {
    m_Position = pos;
    m_Up = up;
    m_Right = right;
}

glm::mat4 BaseCamera::getViewMatrix() {
    const glm::vec3 front = glm::cross(m_Up, m_Right);
    const glm::vec3 center = front + m_Position;
    m_ViewMatrix = glm::lookAt(m_Position, center, m_Up);
    return m_ViewMatrix;
}

glm::mat4 BaseCamera::getProjectMatrix() {
    m_ProjectMatrix = glm::identity<glm::mat4>();
    return m_ProjectMatrix;
}






